﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Guess.aspx.cs" Inherits="Jy123.Web.Manage.User.Guess.Guess" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../../css/custom/jquery.ui.css" rel="stylesheet" type="text/css" />
    <link href="../../css/main.css" rel="stylesheet" type="text/css" />
    <script src="../../js/jquery.js" type="text/javascript"></script>
    <script src="../../js/jquery.ui.js" type="text/javascript"></script>
    <script src="../../js/main.js" type="text/javascript"></script>
    <title>竞猜管理</title>
</head>
<body>
    <form id="form1" runat="server">
    <h4>
        <a href="#"><span>竞猜管理</span></a></h4>
    <div class="register">
        <ul>
            <li><a class="btnsty" href="Guess.aspx">所有竞猜</a></li>
            <li><a class="btnsty" href="Guess.aspx?s=0">待审核竞猜</a></li> 
            <li><a class="btnsty" href="Guess.aspx?s=1">当天待结算竞猜</a></li>   
        </ul>    
    </div>
    <asp:Repeater runat="server" ID="Rpt_GuessList">
        <HeaderTemplate>
            <table class="tblist">
                <tr>
                    <th>
                        编号
                    </th>
                    <th>
                        用户
                    </th>
                    <th>
                        标题
                    </th>
                    <th>
                        状态
                    </th>
                    <th>
                       (人数/份数)
                    </th>
                    <th>
                       回复数
                    </th>
                    <th align="center">
                        操作
                    </th>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr id="<%#Eval("ID") %>">
                <td>
                    <%# Container.ItemIndex + 1 + pagesize * (cpage - 1)%>
                </td>
                <td>
                    <a href="Guess.aspx?s=2&uid=<%# Eval("FUser")%>" target="_parent">
                        <%# GetUserName(Eval("FUser"))%></a>
                </td>
                <td>
                    <a href="GuessCheckUp.aspx?GuessID=<%# Eval("ID")%>" target="_parent">
                        <%# Eval("Title")%></a>
                </td>
                <td class="cred">
                    <%# ConvertStatus(Eval("ID"))%>
                </td>
                <td>
                    <%# GetStat(Eval("ID"))%>
                </td>
                <td>
                    <%# GetReview(Eval("ID"))%>
                </td>
                <td>
                    <%# getButton(Eval("ID"))%>
                </td>
            </tr>
            
        </ItemTemplate>
        <FooterTemplate>
         <tr>
               <td colspan="8" style="text-align: right;">
                    <% =string.Format("当前{0}/{1},共{2}条记录", cpage, count[1], count[0]) + PageString((int)count[1], cpage, "Guess.aspx?page=$num$")%>
                </td>
            </tr>
            </table>
        </FooterTemplate>
    </asp:Repeater>
    <div class="register">
        <h5>
            竞猜操作</h5>
        <ul>
         <li><a class="btnsty" href="GuessAdd.aspx">发布新竞猜</a> </li>
            <li><a class="btnsty" href="javascript:delAll();" visible="false">清空所有竞猜</a> </li>
             <li><a class="btnsty" href="javascript:sett();">到期竞猜结算</a> </li>
        </ul>
 <%--       <ul class="bb">
            <li>输入会员姓名搜索你要找的竞猜</li>
            <li>
                <asp:TextBox ID="Key" runat="server" Width="200" CssClass="text"></asp:TextBox></li>
            <li>
                <asp:Button ID="btnSearch" CssClass="button" runat="server" Text=" 搜索 " 
                    onclick="btnSearch_Click" /></li>
        </ul>--%>
    </div>
    </form>
</body>
</html>

<script language="javascript" type="text/javascript">
function del(id,page)
{
    if(confirm('你确认删除此竞猜吗?'))
        self.location="?Type=del&GuessID="+ id+"&page=" + page;
}
function delAll()
{
    if(confirm('你确认删除所有竞猜吗?此操作不可逆！'))
        self.location="?Type=delAll";
}
function sett()
{
    if(confirm('你确认要对所有到期竞猜进行结算吗?'))
        self.location="?Type=settAll";
}
</script>

